package com.zzyk.microCloud.api.controller;

import com.zzyk.main.configuration.exception.UserException;
import com.zzyk.main.model.vo.Message;
import com.zzyk.main.model.vo.UserInfo;
import com.zzyk.main.service.ISysUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wss_PC
 * @DESCRIPTION 小程序用户相关接口
 * @create 2021/1/22
 */
@RequestMapping("/api/user")
@RestController
public class ApiUserController extends ApiBaseController {
    @Resource
    private ISysUserService sysUserService;

    @GetMapping("/userInfo")
    public Message userInfo() throws UserException {
        UserInfo userInfo = getUser().getUserInfo();
        return Message.success().addData("data", userInfo);
    }

}